begintalkscript;
variables;

begintalknode 1;
state = -1;
nextstate = 1;
condition = 1;
question = "Tetta";
text1 = "There is a vahnatai keeping this shop. He looks willing to sell you his wares.";
text2 = "_Hello humans. Me Tetta. Me keep this shop._";
action = INTRO;
text5 = "The vahnatai notices you but remains silent.";

begintalknode 2;
state = 1;
nextstate = 1;
condition = 1;
question = "Can you tell me about this place?";
text1 = "There is a long, silent pause. _Sorry, me no understand._";

begintalknode 3;
state = 1;
nextstate = 1;
condition = 1;
question = "Can we trade?";
text1 = "You finish shopping.";
code = begin_shop_mode("Vahnatai Stuff", "Tetta is willing to sell you some things that are typical to vahnatais.", 20, 5, -1);
break;






begintalknode 4;
state = -1;
nextstate = 2;
condition = 1;
question = "Derbis";
text1 = "This vahnatai seems to know English quite well. He is quite tall and dressed up in the uniform of a lord.";
text2 = "_Greetings, surface people. We don't want war with you, though you stole our treasures in the past._";
action = INTRO;
text5 = "_Hello!_";

begintalknode 5;
state = 2;
nextstate = 3;
condition = get_flag(104, 5) == 0;
question = "WE did not stole them. It was a band of empire soldiers.";
text1 = "_I know, it's just that we combine individuals with their race. It seems that you're not before the theft._";
text2 = "_Rendar should hear this._";

begintalknode 6;
state = 3;
nextstate = 4;
condition = 1;
question = "Who is Rendar?";
text1 = "_The other of the two lords here. I am the one who does the governor's job, and Rendar performs the operation._";
text2 = "_Don't ask me about the operation. I know as little as you know about it._";

begintalknode 7;
state = 4;
nextstate = -1;
condition = 1;
question = "Can I go see him?";
text1 = "_Yes. Follow the main path to the north. Right before the exit there is a building. The guards will let you in._";
code = erase_char(12);
       erase_char(13);
       set_flag(104, 5, 1);
break;

begintalknode 8;
state = 2;
nextstate = 2;
condition = 1;
question = "Do you know anything about an object called the 'Orb of Nar'?";
text1 = "_HmmmmThat name sounds familiar. Perhaps you should ask Rendar._";

begintalknode 9;
state = 2;
nextstate = 2;
condition = 1;
question = "Tell me about this castle.";
text1 = "_This is the centre of our realm Gherbag. This place is locatedhmmm800 miles up left from the hearts of our realms._";
text2 = "_We are supposed to do some kind of operation here, but I don't know anything about it._";







begintalknode 13;
state = -1;
nextstate = 5;
condition = 1;
question = "Rendar";
text1 = "This vahnatai's magic is so powerful that you can sense it from behind the counter.";
text2 = "_Hello, humans. I am Rendar-Bok. What business do you have here?_";
action = INTRO;
text5 = "_Greetings!_";

begintalknode 14;
state = 5;
nextstate = 6;
condition = 1;
question = "Are you the leader of these vahnatai?";
text1 = "_Yes, I am. I am also the leader of the operation._";

begintalknode 15;
state = 6;
nextstate = 8;
condition = 1;
question = "What is the operation?";
text1 = "_We areexperimenting on how to manipulate organisms without distorting their specified essence capacity._";

begintalknode 16;
state = 6;
nextstate = 7;
condition = get_flag(104, 0) == 0;
question = "Do you know anything about the Orb of Nar?";
text1 = "_Oh, yes. So that is why you're here. To take it back. We're so sorry for stealing it, but we wanted it soooooo much._";
text2 = "_No, you go back and tell your job giver that we will not give it back, at least not now._";
action = END_TALK;
code = set_flag(104, 0, 1);
break;

begintalknode 17;
state = 5;
nextstate = 9;
condition = get_flag(104, 0) == 2;
question = "I'm sorry, but this is emergency. We need the orb now. You'll have it back after the whole thing is over.";
text1 = "_We need it too, butIt is your orb. Go to the tomb of Hira-Bok and take it. After we get it back, we will send you our soldiers to help when you're without the orb._";
code = set_flag(104, 0, 3);
break;

begintalknode 18;
state = 8;
nextstate = -1;
condition = 1;
question = "So you are doing shaping?";
text1 = "_Well, yes. We know that it is a dark art, but we need it. The ordinary non-flame-breathing hydras are going extingt. We need the food from them.";

begintalknode 19;
state = 9;
nextstate = -1;
condition = 1;
question = "Where is the tomb of Hira-Bok?";
text1 = "_Leave the castle to the east. It is straight forward. You can't miss it._";





begintalknode 20;
state = -1;
nextstate = 10;
condition = 1;
question = "Tylg";
text1 = "This is a vahnatai shaper, one of the learned. If it doesn't appear in the uniform, it appears in the name as the extension 'irhno'.";
text2 = "This one knows English. _Hello, uh, surface folk! Me Tylg-Irhno._";

begintalknode 21;
state = 10;
nextstate = 10;
condition = 1;
question = "You are a irhno? Can you teach me spells?";
text1 = "You finish training.";
code = begin_shop_mode("Vahnatai Spells", "Some of these spells are familiar to you. Being of vahnatai origin, they are only formuled a little differently.", 8, 3, -1);
break;

begintalknode 22;
state = 10;
nextstate = 11;
condition = 1;
question = "Can you tell me about Gherbag?";
text1 = "_Uh, it is big cave. Hundreds miles up left from the centre. We teleport here._";

begintalknode 23;
state = 11;
nextstate = -1;
condition = 1;
question = "What do you mean with 'up left'?";
text1 = "A long silence. _Me no understand._";